// 获取/src/icons下的所有svg图标
const iconFiles: Record<string, any> = import.meta.globEager('../../icons/**.svg')
const iconNames: Array<string> = []
for (const modulePath in iconFiles) {
  if (Object.prototype.hasOwnProperty.call(iconFiles, modulePath)) {
    // '../../icons/404.svg' => '404'
    const moduleName = modulePath.replace(/^\.\.\/\.\.\/icons\/(.*)\.\w+$/, '$1')
    iconNames.push(moduleName)
  }
}

export default iconNames
